#include <bits/stdc++.h>
using namespace std;

const int N = 2e5 + 50;

int a[N];

char s[N], t[N];

int n, k;

bool global;

bool add1(char s[], int l, int r)
{
    int x = 1;
    for (int i = r - 1; i >= l; --i)
    {
        s[i] += x;
        x = (s[i] - '0') / 10;
        s[i] = (s[i] - '0') % 10 + '0';
    }
    return x;
}

int main(int argc, char const *argv[])
{
    scanf("%d%d", &n, &k);
    scanf("%s", s);
    // int st = -1;
    strcpy(t, s);
    for (int i = k; i < n; ++i)
        t[i] = t[i - k];
    if (strcmp(t, s) >= 0)
    {
        printf("%d\n%s\n", n, t);
        return 0;
    }
    add1(s, 0, k);
    int j = k;
    for (; j < n; j++)
        s[j] = s[j - k];

    printf("%d\n%s\n", n, s);

    return 0;
}
